home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
011
/
filer2.arc
/
FILER2.DOC
next >
Wrap
Text File
|
1986-01-24
|
16KB
|
413 lines
FILER v2.00
(BETA TEST VERSION)
FILER2 is a general purpose command-driven file handler.
Unlike many currently popular file handling shells, FILER2 is not
menu-driven; it uses commands similar to those provided by DOS,
such as COPY, RENAME, ERASE, and so on. Some users (obviously
including the author) find commands, once learned, to be more
efficient and easier to use than menus.
Because many FILER2 commands are the same as DOS commands, the
obvious question is, "Why use FILER2 at all?". FILER2 commands
have two basic advantages over the equivalent DOS commands.
First, FILER2 is much safer:
-- It will NEVER erase or write over a file without giving
you a chance to change your mind.
-- It offers a "preview" mode that allows you to see what
effects your commands will have, without actually executing
the commands.
Second, FILER2 is more powerful:
-- It offers more powerful wildcards than DOS.
-- It offers a "select" mode, which allows you to select or
pass over individual files that meet your wildcard file
specification.
-- Many of the individual commands are more powerful than
DOS equivalents. RMDIR, for example, doesn't care if the
directory being removed is empty or is the current
directory, and it can remove an entire subtree.
This document assumes a basic familiarity with DOS file handling
commands such as COPY, ERASE, RENAME, CD, etc., and with DOS's
'*' and '?' wildcards.
Execution modes
---------------
FILER2 has two basic modes: single command mode, and multiple
command mode. In single command mode, FILER2 will execute one
command and return to the DOS prompt. In multiple command mode,
FILER2 will display its own prompt, from which you can execute as
many file handling commands as you wish.
To execute FILER2 in single command mode, type at the DOS prompt:
FILER2 <command> [parameters] [/switches]
For example:
C> FILER2 erase ch*.* /p
FILER2 will execute the single command "erase ch*.* /p", and you
will be returned to the DOS prompt.
To execute FILER2 in multi-command mode, type "FILER2" (without
parameters) at the DOS prompt:
C> FILER2
You will be placed at the FILER2 prompt, which looks like this:
FILER2>
At the FILER2 prompt, you can execute as many FILER2 commands as
you want. To return to the DOS prompt, type Q or QUIT.
Wildcards
---------
FILER2's wildcards are similar to, but more powerful than, the
DOS equivalents.
The '*' wildcard represents any string of characters (including
the null string), and the '?' wildcard represents any single
character. So far, the same as DOS.
However, the '*' wildcard need not be at the end of the filename
or extension, and there can be more than one '*' in each. For
example,
c*d.com
matches 'ced.com', 'crud.com', etc. And
c*t*n.*m
matches (for example) 'cvtbin.com', 'carton.sum', 'ctn.m', etc.
One other change from DOS is that the '?' never matches a null
character (an inconsistency in DOS). That is, 'c???' matches
'crud' but not 'ced'.
A final change is that missing filenames and extensions are
ALWAYS assumed to mean '*'. Thus, 'c' is equivalent to 'c.*',
and '.com' is equivalent to '*.com'. DOS uses this convention in
a few commands, but not consistently. If you specifically want
files with no extensions, use '.', as in 'foo.'.
Avoid using consecutive *'s and the sequence '*?'. However, the
sequence '?*' is meaningful and useful. For example, 'c?*'
matches any filename of 2 or more characters beginning with 'c'.
Wildcard substitution
---------------------
Wildcard substitution will work pretty much as you'd expect. For
example, if you type
FILER2 copy a*c.* x*y.*
and FILER2 finds the matching file 'abc.txt', it will copy it to
a file named 'xby.txt'.
As with DOS, it is possible to create "wildcard mismatches". For
example, consider:
FILER2 copy *.* some.txt
Clearly, FILER2 may find more than one file matching "*.*"; these
will ALL be copied to the same file, "some.txt". This is called
a "wildcard mismatch": the set of wildcards in the source
filespec doesn't match the set of wildcards in the destination
filespec. FILER2 will accept wildcard mismatches, but it will
warn you with the message "WARNING: wildcard mismatch".
Note that you would be saved (in the above "*.* -> some.txt"
example) by the fact that FILER2 won't overwrite an existing file
without requesting verification. Thus, the first matching file
would be copied to "some.txt", but copying the second file would
overwrite the new "some.txt", and FILER2 would prompt for
verification.
One wildcard mismatch that is allowable in DOS but should be
avoided in FILER2 is exemplified by
FILER2 copy zap.exe b:*.*
Avoid this; you'll end up with a blank filespec.
The general rule is to match the source wildcard sequence by the
destination wildcard sequence, unless you have a pretty good
reason for not doing so.
Option switches
---------------
Any FILER2 command may include any or all of these option
switches:
/P Preview mode. In preview mode, FILER2 will process the
command normally EXCEPT that it won't actually perform
any disk writes, erases, etc. You can use this to see
exactly what effect something like
move c?*x*t.?r? d:\foo\xx*.xf?
will have, without actually DOING anything. In preview
mode, all output will be prefixed by "[Prvw]".
/S Select mode. In select mode, FILER2 will ask you
whether or not you want to process each file that
matches the source filespec. In other words,
erase *.* /s
will ask you whether you want to erase each *.* file.
/A Archive mode. Affects COPY command only. With Archive
mode set, COPY will only copy files whose archive bits
are set. It will reset the archive bit (on both source
and destination) when it is finished.
Switches may be set in any order, before or after the command.
FILER2 Commands
---------------
Many commands may be abbreviated. The minimum required command
length is shown in CAPS. For example, "DELete" may be entered as
DEL, DELE, DELET, or DELETE.
CD or CHDIR - change directory
Exactly like the equivalent DOS command.
CLS - Clear screen
Clears the screen. ANSI.SYS required.
COPY - copy files
Pretty much like the basic version of the DOS COPY command,
except that all file overwrites are verified and you have
the /S, /P, and /A options. Does not support a COPY from a
character device (e.g., COPY CON ...), and does not support
DOS's "+" operator to concatenate files during the copy
process.
DELete - delete files
Pretty much like the DOS command, except that the /P and /S
options are available.
DIR - directory
Just a quick 5-up reference list of files matching a given
filespec. For real directories, use DOS (below).
DOS - execute a DOS command or program.
For example, "DOS dir" gives you a DOS directory.
ERASE - erase files
Identical to DELete.
FIND - find files
Find files matching a given filespec, anywhere on the disk.
For example, "FIND *.exe" finds all .exe files on the
default drive. Add a directory name to search only a given
subtree.
MD or MKDir - make a directory
Exactly like the DOS command.
MOVe - move or rename files
Allows you to move files from one drive to another, one
directory to another, or to rename files. Examples:
move temp.foo d:\archive\arc.001
move \doc\temp.foo \archive
move temp.foo arc.001
(The last is simply a rename operation.) If the move is
across drives, MOVE performs a copy and delete; otherwise,
it simply uses a DOS rename (the file is not actually
copied).
NOTE: MOVE is identical to REName. There is a separate
section, below, that explains MOVE in greater detail.
Quit - return to DOS
Exits multi-command mode.
RD or RMDir - remove a directory or subtree
Removes a directory, without any of DOS's restrictions. If
the directory is not empty, deletes all files before
removal. If the directory contains subdirectories, removes
them too. If the current directory is one of those removed,
you'll end up at the root. All file erasures are confirmed.
REName - rename or move a file
Identical to MOVe.
Tree - display a directory tree
Just like DOS, but more compact.
VERsion - display FILER2 version.
Displays version and copyright.
More about MOVE and RENAME
--------------------------
These two commands (which are identical) are somewhat more
complex than the DOS equivalent (REN or RENAME). DOS's rename
does exactly what it says: it renames a file. FILER2's MOVE can
be used for that purpose, but it can also be used to move a file
from one directory to another, or from one disk to another. When
a file has been moved, only the new copy of the file remains on
disk. Thus,
FILER2 move \util\myprog.exe \lib\someprog.exe
is functionally equivalent to the two DOS commands
copy \util\myprog.exe \lib\someprog.exe
del \util\myprog.exe
It is useful to know when a file will simply be renamed, and when
it will be moved. The rule is:
If the destination filespec contains no path, or if it
contains a path and it is the same as the source path, then
it will be renamed. Otherwise, it will be moved.
Examples (assume that the current dir is C:\UTIL):
move \util\abc.txt cde.txt [rename]
move \util\abc.txt \util\cde.txt [rename]
move \util\abc.txt c:cde.txt [rename]
move abc.txt \lib\abc.txt [move]
move abc.txt \lib\cde.txt [move]
move \util\abc.txt \lib\abc.txt [move]
move abc.txt d: [move]
move abc.txt d:\util [move]
Note that you can MOVE files from one drive to another.
If files are moved from one directory to another on the same
disk, FILER2 uses a very safe and efficient DOS function that
simply moves the directory entry, without physically copying the
file itself. If files are moved from one drive to another,
FILER2 will perform a COPY and DELETE.
FILER2 and PCED
---------------
FILER2 is PCED compatible. All PCED editing facilities,
USERSYNs, etc., are available, as are user-installed commands.
You may find it handy to define synonyms for DOS commands, such
as:
CED SYN del*ete c:\util\filer2.exe delete
Then a command like "del *.*" will use FILER2's delete function
rather than the DOS delete function.
Copyright and disclaimer
------------------------
The FILER2 program and this document are copyrighted by the
author. However, they are released for public distribution.
FILER2 is intended for your PRIVATE, NONCOMMERCIAL USE ONLY. You
may make copies of the FILER2 program and of this documentation
file (you must retain this notice!) for your own use or for the
use of others. You may NOT, however, charge for any such copies,
or in any other way sell the program or attempt to make money
from it or any modified version of it. Please.
An exception to the above is granted to recognized user's groups,
which are authorized to charge a small amount (not to exceed
$6.00) for media, postage, handling, etc.
Those who wish to use FILER2 in a commercial environment should
contact the author at the address given below.
I do not warrant that the program is free from defects, that it
operates as designed, or that the documentation is accurate. I
will not be liable for any damages of any kind sustained through
the use of the program. By using the program, you agree to this.
* * * * * * * * * * *
Remember, this is a TEST version of FILER2. There may be, and
probably are, bugs--so use it carefully. Make liberal use of the
/P (preview) mode. Comments, suggestions, and bug reports
(please be specific) may be reported to the address below, or
(better) via CompuServe. The best way to contact me is via the
IBM Novice Forum (PCS129 or IBMNOV); my user ID is 76703,2002.
* * * * * * * * * * * *
Copyright (c) 1986 by
Christopher J. Dunford
The Cove Software Group
P.O. Box 1072
Columbia, Maryland 21044
(301) 992-9371